Notes on the MACD Enhanced Signal

The so called MACD Enhanced signal comes is based on Mathematical Techniques in Financial Market Trading by Don K. Mak, World Scientific Publishing, 2006, Chapter 4. This filter is described as "Zero-lag" EMA and is attributed to J.F. Ehlers. This filter is most certainly not "zero-lag", especially with the window sizes listed here.

Although I have cited it here, I cannot recommend Don Mak's book. While Don Mak attempts to put technical analysis on a more scientific and mathematical footing, the book is needlessly obscure.

M = window size
pt is the tick price at time t
m is the EMA time series

a = 2 / (M+1) Example: for M300, a = 2 / (300 +1)

mt+1 = (a * pt ) + (1 - a) * mt

If there is a series of tick prices p1, p2, p3... how does the EMA start? Is it

m1 = (a * p2 ) + (1 - a) * p1

or, do we consider m0 = 0 and the equation is

m1 = (a * p2 ) + (1 - a) * 0 ==> m1 = (a * p1 )

For m1, I decided to treat m0 = 0.

The full MACD Enhanced is

St = m300t - m500t

Where m300 and m500 are the m EMA series with 300 and 500 element "windows".

X200t+1 = ( a200 * St ) + (1 - a) *X200t

Where a200 ==> a = 2/(200+1)

If we have the S time series S1, S2, S3... how does the X200t series start. Is it

X2001 = ( a200 * S2 ) + (1 - a) *S1

or, do we consider X0 = 0 and the equation is

X2001 = ( a200 * S1 ) + (1 - a) * 0 ==> X2001 = ( a200 * S1 )

For X2001 , I decided to treat X0 = 0.